//+build wireinject

package usecase

import (
	"clean/infra/repo"
	"clean/usecase/mock"
	"github.com/google/wire"
	"github.com/petergtz/pegomock"
)

// 该文件仅用来生成

var appBaseSet = wire.NewSet(
	NewInput,
	wire.Struct(new(App), "*"),
	repo.Create,
	wire.Struct(new(Repo), "*"),
	NullMockOption,
)

var mockRepoSet = wire.NewSet(
	mock.NewHelloRepo, wire.Bind(new(HelloRepo), new(*mock.HelloRepo)),
)

var mockOtherItfSet = wire.NewSet(
	mock.NewSensitiveWords, wire.Bind(new(SensitiveWords), new(*mock.SensitiveWords)),
)

func NullMockOption() []pegomock.Option {
	return nil
}

func NewMockApp() (*App) {
	panic(
		wire.Build(
			wire.NewSet(
				appBaseSet, mockRepoSet, mockOtherItfSet,
			)),
	)
}
